﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MaintenanceForm.aspx.cs" Inherits="MaintenanceMgm_MaintenanceForm" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>填写维修表单</title>
    <link href="../Style/MyWork.css" rel="stylesheet" />
    <style>
        /* 侧边栏样式 */
        .menus {
            list-style: none;
            padding: 0;
            margin: 0;
            transition: left 0.5s; /* 动画效果 */
            position: absolute;
            top: 100px;
            left: -200px; /* 默认隐藏 */
            bottom: 0;
            overflow-y: auto;
            float: left;
            width: 200px;
            height: 650px;
            background-color: coral;
            border-radius: 11px;
        }

            .menus li {
                padding: 3px;
            }

            .menus a {
                text-decoration: none;
                display: block;
                padding: 8px 16px;
                color: black;
            }

                .menus a:hover {
                    background-color: #555;
                    color: white;
                }
        /* 图片按钮样式 */
        .menu-toggle {
            cursor: grab;
            float: left;
        }

        .button3 {
            position: absolute;
            top: 12%;
            left: 26%;
        }

        .list {
            text-decoration: none;
        }
        /*返回按钮样式*/
        .returnbutton {
            position: absolute;
            top: 15%;
            left: 25%;
        }
        /* 基本表格样式 */
        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }

        /* 表格行样式 */
        tr {
            background-color: #f2f2f2;
            border: 1px solid #ddd;
            padding: 10px;
        }

        /* 表格头样式 */
        th, td {
            border: 1px solid #ddd;
            padding: 8px;
            text-align: left;
        }

        /* 标签样式 */
        label {
            margin-right: 10px;
            font-weight: bold;
        }

        /* 文本框样式 */
        .form-input {
            width: 100%;
            padding: 8px;
            margin: 5px 0;
            display: inline-block;
            border: 1px solid #ccc;
            border-radius: 4px;
            box-sizing: border-box;
        }

        /* 多行文本框样式 */
        .form-textarea {
            width: 100%;
            padding: 8px;
            margin: 5px 0;
            display: inline-block;
            border: 1px solid #ccc;
            border-radius: 4px;
            box-sizing: border-box;
            height: 100px;
        }

        /* 下拉列表样式 */
        .form-select {
            width: 100%;
            padding: 8px;
            margin: 5px 0;
            display: inline-block;
            border: 1px solid #ccc;
            border-radius: 4px;
            box-sizing: border-box;
        }

        /* 只读文本框样式 */
        .readonly-input {
            background-color: #e9e9e9;
        }
        /*提交按钮*/
        .submitB {
            background-color: palevioletred;
            color: #3b82f6;
            border: none;
            cursor: pointer;
            border-radius: 8px;
            width: 100px;
            height: 45px;
            transition: 0.3s;
            
        }

            .submitB:hover {
                background-color: #3b82f6;
                box-shadow: 0 0 0 5px #3b83f65f;
                color: #fff;
            }
            /*返回按钮*/
        .returnbutton {
            background: #fbca1f;
            font-family: inherit;
            padding: 0.6em 1.3em;
            font-weight: 900;
            font-size: 18px;
            border: 3px solid black;
            border-radius: 0.4em;
            box-shadow: 0.1em 0.1em;
            cursor: pointer;
        }

            .returnbutton:hover {
                transform: translate(-0.05em, -0.05em);
                box-shadow: 0.15em 0.15em;
            }

            .returnbutton:active {
                transform: translate(0.05em, 0.05em);
                box-shadow: 0.05em 0.05em;
            }
    </style>
</head>
<body>
    <form runat="server">
        <div id="one">
            <%--第一部分--%>
            <div id="logo">
                <img src="../Image/学校.png" alt="Alternate Text" class="menu-toggle" style="margin: 10px; width: 50px; height: 50px; float: left;" />
                <h3 style="margin-top: 22px; font-size: 20px; float: left;">高校资产管理系统</h3>
            </div>
            <div id="daohang" runat="server">
                <%--导航面板--%>

                <ul style="float: right; list-style-type: none; width: 400px;" runat="server">
                    <li></li>
                    <li style="margin-top: 6px;"><a href="../ChangePwd.aspx" class="Topstatus">修改密码</a></li>
                    <li style="margin-top: 6px;"><a href="../GetPwd.aspx" class="Topstatus">找回密码</a></li>
                    <li style="margin-top: 6px;"><a href="../MyUAMSWeb.aspx" class="Topstatus">退出登录</a></li>

                </ul>
            </div>
        </div>



        <hr align="left" size="3px" color="gray" width="920px" style="width: 100%;" />
        <%--状态栏--%>
        <div id="status">
            
        <asp:Label ID="lblProErr" runat="server"></asp:Label>
            <asp:Label ID="username" runat="server"></asp:Label>
        </div>


        <nav class="menus">
            <%--侧边栏--%>
            <ul>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="../UserWork/MyWork.aspx" style="text-decoration: none;">我的业务</a>
                </li>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="../UserWork/InsertAsset.aspx" style="text-decoration: none;">计入资产</a>
                </li>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="../UserWork/AssetCategory.aspx">计入类别</a>

                </li>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="AllMaintenance.aspx">维修申请</a>
                </li>
                <li style="float: left; list-style: none; padding: 3px;">
                    <a href="../UserWork/UpdataAmount.aspx">库存管理</a>
                </li>
                <li style="float: left; list-style: none; padding: 3px;"></li>
            </ul>
        </nav>
        <div class="content" style="border-radius: 10px; position: absolute; top: 15%; left: 25%;">
            <%--主要内容--%>
            <table>
                <tr>
                    <td>
                        <asp:Label ID="Label1" runat="server" Text="资产编码" AssociatedControlID="txtAid"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtAid" runat="server" ReadOnly="True" CssClass="form-input readonly-input"></asp:TextBox>
                    </td>
                    <td>
                        <asp:Label ID="Label2" runat="server" Text="资产名称" AssociatedControlID="txtAname"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtAname" runat="server" ReadOnly="True" CssClass="form-input readonly-input"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label3" runat="server" Text="申请人" AssociatedControlID="txtMFname"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtMFname" runat="server" CssClass="form-input"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="申请人不能为空！" ToolTip="申请人不能为空！" ControlToValidate="txtMFname" ForeColor="Red" SetFocusOnError="True">!</asp:RequiredFieldValidator>
                    </td>
                    <td>
                        <asp:Label ID="Label4" runat="server" Text="申请人电话" AssociatedControlID="txtFphone"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtFphone" runat="server" CssClass="form-input"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="电话不能为空！" ToolTip="电话不能为空！" ControlToValidate="txtFphone" ForeColor="Red" SetFocusOnError="True">!</asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="电话格式不正确" ControlToValidate="txtFphone" ForeColor="Red" ValidationExpression="(\(\d{3}\)|\d{3})?\d{8}" SetFocusOnError="True">!</asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label7" runat="server" Text="地点" AssociatedControlID="txtArea"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtArea" runat="server" CssClass="form-input"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtArea" ErrorMessage="地点不能为空" ForeColor="Red" SetFocusOnError="True">!</asp:RequiredFieldValidator>
                    </td>
                    <td>
                        <asp:Label ID="Label5" runat="server" Text="维修人" AssociatedControlID="AllMan"></asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList ID="AllMan" runat="server" CssClass="form-select">
                            <asp:ListItem></asp:ListItem>
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="AllMan" ErrorMessage="请选择维修人" ForeColor="Red" SetFocusOnError="True">!</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label8" runat="server" Text="预约时间" AssociatedControlID="txtRdate"></asp:Label>
                    </td>
                    <td colspan="3">
                        <asp:DropDownList ID="txtRdate" runat="server" CssClass="form-select" AutoPostBack="true">
                            <asp:ListItem Value="0">9:00-10:20</asp:ListItem>
                            <asp:ListItem Value="1">10:40-12:00</asp:ListItem>
                            <asp:ListItem Value="2">14:00-15:20</asp:ListItem>
                            <asp:ListItem Value="3">15:30-16:50</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label6" runat="server" Text="详细信息" AssociatedControlID="txtDescribe"></asp:Label>
                    </td>
                    <td colspan="3">
                        <asp:TextBox ID="txtDescribe" runat="server" TextMode="MultiLine" CssClass="form-textarea"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtDescribe" ErrorMessage="请填写详细信息" ForeColor="Red" SetFocusOnError="True">!</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" style="text-align:center;vertical-align:middle;">
                        <asp:Button ID="submit" runat="server" Text="提交" CssClass="submitB" OnClick="submit_Click"/>
                    </td>
                </tr>
            </table>
            

        </div>
        <asp:Button ID="return" runat="server" Text="返回" OnClick="return_Click" CssClass="returnbutton" CausesValidation="false"/>
        
    </form>
    <script src="Scripts/MyWork.js"></script>
    <script>
        // 获取侧边栏和图片按钮元素
        var sidebar = document.querySelector('.menus');
        var menuToggle = document.querySelector('.menu-toggle');

        // 为图片按钮添加点击事件
        menuToggle.addEventListener('click', function () {
            // 切换侧边栏的显示和隐藏
            var sidebarStyle = sidebar.style;
            if (sidebarStyle.left === '-200px') {
                sidebarStyle.left = '0';
            } else {
                sidebarStyle.left = '-200px';
            }
        });
    </script>
    
</body>
</html>
